Fix preferences dialog layout