Fix for issue #223. Handle situation where windows is nil.

I modified the check on the windows array to handle the situation that was nil.  This was causing breakage for me in when trying to use 3.0.3