Fixed highlighting range for errors in class object