Bug/bem fix layout and sorting