init: fix some wrong error checking