fix warnings for generate