Fix memory leak in tiling code and used a global queue instead of a custom one for tiling