Fix error during template rendering