add missing error check