Fixing orientation change bug before version 3.0