add first_child check before using colspan