achieve observe-shim compatibility
improve error handling