Fixing direct_to_template error