Better error handling in the server..