resolved javascript error