Fix JS bug

‘buff said