Merged fixes from TPolzer