Fix incorrect casts in gui code.

Caused by removed IInventory implementations.