moved code from viewDidUnload into dealloc