Halting type I planet migration in non-isothermal disks