Fixed and added test mainly to support the two APIs for retries