fix of the infinite click at the end