fixed jQuery plugin's stop condition