Update utils.js

Forgot to modify array in place