PTID fixes, to be continue
PTID fixes pointed by RehabMan
merge latest kozlek/master