Fixing js issue