Fixed API errors that were discovered during runtime