Fix error on JavaScript projections

Closes #235.