Simplified the apply an orientation lock algo