fixed an error causing wrong filename