register debug, fix?