Fix for plugin registration and possible JS var collision