fixed ftp bug in js