fixed onItemClick() to use cursor adapter for detail