changed mainpane to width instead of right margin