Fix for js equality bug