fixed bug for view