fix sql mistake