fix JS error & missing settings UI in plugin mode