Yes the original code just waited for this unlock handle to not be displayed. Any reason why you changed it?
I agree this could be a problem on different screen size like Leo.