fixed bug in view