fixing wrong behavior on rotation change at different views