minor bugfixes for API functions after testing