two small bug fixes for better integration with the client