fix a minor bug in view