fixed bug / patch by Duong-Khang NGUYEN <neoneurone@users.sf.net>