Fixed plugin crashing when first launch