adds GD_RECURSIVE flag