some fixes to custom-vars and tweaks