fixes to lpc_upload.sh