Finally fix that horrible lockup (I think)