Fixed mathematical operations for FLAGs.