Moving to double precision and introducing an additional security check