fix bug in view