Fixed a bug in checkout