Fix tests which start failing from go 1.2