double/float mismatch fix