fix bug in belongToMany when using first.