Fixed bug in .js