fix dependency ordering