fixed bug when a user passes an element