Fixed error in api