Fix JS error - Closes #3