Fix mask bounds