fixed retain/release bug when dismissing a modal view