Fix for has_many :through issue