A fix to make it work with UserDir