fixed bug in checkout method