fixing js issues