I'm not exactly sure what you are describing here. How it should be set up is the heat mat should be on the outside of the tank on the floor of the tank. The probe for your thermostat should be sandwiched between the heat mat and the bottom of the tank, both are outside the tank not inside. Then you want to use your heat gun to get the inside surface of the glass to the desired temps. Then you can put your substrate on top of that. That way if your snake feels it needs to be a little warmer it will burrow down to the glass. For example if you turn the heat up enough that the top of the substrate is 90 degrees then the glass surface will be too hot.