Bugfix edge/connect! and add test for this function.