Only 50% of keys being able to be sold

Got the problem with my bot that it only wanted to sell 50% of his keys. Now it will be able to sell all the keys at once.