fix errcheck errors