Avoid conversion error on MSSQL