Fixing issue where file inputs are re-populated with data

Fixes #772