Fixed some connection management errors, keyboard improvements