Fixed a problem when filtering inner elements