Fixed a bug which lead to a crash when list view is not attached