fixing js issue