fix issue https://github.com/lad1337/XDM/issues/54