corrected more bugs
generating grid w/ relations now works