Session and Generator template fixes

Session SQL dump
Fixes in generator templates