little bug in js