added new close connection, and working on rename bugs