breaks cgi usage scenario.
It's not perfect, but is there any other on-the-fly tile generation process after accepting this pull request?