Karunaratne brings up a ton after being dropped by Bangladesh