removed bug with keyboard event
added session synch