Attempt to fix logic error

Reported via: http://forums.nas4free.org/viewtopic.php?f=79&t=3894&sid=3b32fc1e08feaf9741dfbc709c374f1a#p20418