Fix n00b deadlock code