Fix small javascript bug