bug fix on getting the wrong detail