Following code works for numbers less than 200 but giving wrong sum for greater than 200 numbers?

```
function sumPrimes(num) {
numbers = [];
sums = 0;
for(i=2;i<num;i++)
{
numbers.push(i);
}
for(i=0;i<numbers.length;i++)
{
if(numbers[i]%2===0 && numbers[i]!==2){
numbers.splice(i,1);
}
}
for(i=0;i<numbers.length;i++)
{
if(numbers[i]%3===0 && numbers[i]!==3){
numbers.splice(i,1);
}
}
for(i=0;i<numbers.length;i++)
{
if(numbers[i]%5===0 && numbers[i]!==5){
numbers.splice(i,1);
}
}
for(i=0;i<numbers.length;i++)
{
sums += numbers[i];
}
console.log(numbers)
return sums;
}
sumPrimes(977);
```