small fix
correct return code check