Police say the bomb went off Monday as worshipers were leaving the mosque in Dera Ismail Khan after evening prayers .