Fix warnings
Enable sort test and comment on bug