This happens very often. In my alching script, if the invo runs out of nats, the script logs. I got many reports saying that it logged ppl out when they had nats in invo, so i did some investigation and it seems that straight after logging in, the check runs before the inventory is cached so it throws a false positive.
You'll have to work around it and/or do some extra checking, as flamezz said you can always switch tabs to refresh the inventory!
~apa