Removed initialization of solution x for error checking and added missing assign_swap