fixing issue where 'then' would find its way into the file structure