Fixed Warnings for Optimizer