fix problem when initializing the pluguin in a jquery collection of elements