some fixes in glags and switches