pulled fixes by jonuts