Little bug in js