fix coding style error
fix the use of a connection as an argument if it exists