More checks and debug