fix a similar problem to previous commit, which presents when not querying through an association