Fixed undefined render function