fixed bugs in sell.php