Fixes #1220: Correcting javascript error.