some fixes for the api method