Fixed with updated SQL commands