js events + layout fix