GUIs now close properly when inventory key is pressed