ugly fix to bug that is for some reason declaring this function/plugin twice