Fix string formatting error in api