fix destroy nilclass exception bug  in detail page
make select/discard task works