Restore accidentally removed code. Spoted-by: bcyrill@github