grid and some fixes