fixed parsing layer grid width bugs in generator