fixed a stupid copy / paste bug
replaced WideCharToMultiByte calls by my wrappers