fixed scp handling of invalid input