fixed main view bug