fix exceptions in servermanager, session, rpcclient