Added allowoverwrite to unload statement, and fixed tests