fix a bug in view