.has(), .children() and .trigger() bugfixes