Bugfix and handle errors for APIs.