manual CPs deleted on optimize, also random clean control points

Sometimes after setting manual control points, and hitting optimize it deletes all the control points I just created, even though optimize settings have "clean up control points" turned off. Quick optimize however works without deleting the manual CPs I just set. Last time it did this, I noticed that it said "panorama needs to be optimized : nan" before clicking optimize.
Also, even though I have the global settings for optimization set with "clean up control points" turned off, after doing a panorama detection it [seemingly randomly] turns clean up control points on, and sets it to remove control points with RMS > 2.0 [which pretty much guarantees that optimization destroys ALL control points for the whole project].
Also, even though I have the global settings for optimization set with "clean up control points" turned off, after doing a panorama detection it [seemingly randomly] turns clean up control points on, and sets it to remove control points with RMS > 2.0 [which pretty much guarantees that optimization destroys ALL control points for the whole project].