fix tileToBBOX logic and add various tests