Fix for AsInt when passed a double.