bug fix with Portrait mode