code fixes to parse upload