fix entropy sorting