Fix bug in view