fix for diagonal walls