Fix bug for view