Fix slave to master conversion https://sourceforge.net/tracker/?func=detail&atid=117457&aid=3603685&group_id=17457