Ensure swapping items does not mean an empty item gets into overflow.
Fix syntax error
Fix my fix.
Code convention
Merge pull request #634 from Oipo/random-fixes

Ensure swapping items does not mean an empty item gets into overflow.