Fixed: not cleaning up before returning EDEADLK signal