fixing js lint errors