#162 Fixed JS bug