small api bug fixes