main view logic bug