fixed bug when setupView was called more than once