Some SQL fixes