Corrected model variable being called outside of route.