fix msf's error on sqrt