fixed SQL generation and travis to match changes