Minor changes to fix GPDB41 bugs