minor bugfix in relation and bugfix in lazy loading of data in query results