fixes a null pointer exception

Hi all,
To test this bug, please try and track this fedex ID: 285374560337654
That's how I got it.
I used ruby-debug to find out where the problem was.
Thanks,
Peter