Fixed wrong session date bug. Handled some warnings, reported by compiler.