Fix bug with bilinear filtering.