Fix potential euler12 bug