fixing js errors
fixing merge conflicts