bugfix when stuck with head