fix layouting bugs