fixing js fail