QTPFS: fix a large part of #3423