fix tiliointi join, code style & sql strict mode