Merge "Fix crash on rotation" into pi-dev