Made sword up detector work correctly