Bug fix for selling stock