Fix grid position and border drawing