Fixed null pointer when resuming detial view.