fixes for python mode not using auto fill properly