corrected bug on create_connection