Resolving JS issues