Fixed more JS issues