recreate input in case of error as well