fixed bugs with attr selector