Fixed swap root case bug