Added "keepInventory" detection. Fixes #6