i think this behaviour was just wrong. if the connection is not defined, the code below was failing.