fix onhead option. head begins from 1, not from 0, therefore the strange behaviour sometimes
some modifications according to the xinerama head stuff