fixed weighted optimizecam bug