Fixed errors and warning to make the property grid demo work.