fix gridding