server fix exception handling