Better support for IE; Fixes bugs that prevented nested sorting