resize and reorientation fixes.