Removed a possible dead lock