Fixed orientation calculation and discard strokes in fragment again