Fix to a problem when sending parameters to the api