minor tweaks to connection.java