Fixed error with API methods.