Fixed runtime error in RazorUtil