checkout - fix error handling