connection used before assignment