update space valid debug function