Fixed a bug in pickWeapon functionality