Fixed details not being shown onclick