fix NULL for parentid