fixed issues left over from port to 3.9