fix layout and rotation bugs and constraint warnings