cleanup for landscape and portrait