player inventory bugfix

Fix for item switching in hotbar
Fixes #1538