Added notification and fixed a sorting bug