fix for ticket #1 by Sinaloit