Fix unchecked error bug in sort abstract