fix string comparison in js