fixed bug https://github.com/Danack/PHP-to-Javascript/issues/20