Added back support for portrait and fixed layouters.