Small changes to api functions