Fixing weird api bug