Fix missing error check