fixes to transfer script