Fixed errors while rendering imperative sample