add session detector
fix compiler encoding