These lines need to be swapped, as @assignment needs to be set first.