silly js mistake