Fixed error in SQL tests