Added Exception handling for client crash