Fix check return value