fix masonry layout problem