const were crashing the plugin