Persistent connections working,bugs fixed