Fixed checkout code