oops, there was a bug is improper push() usage in JS