Added null messages
Fixed deadlocks