fix sorting in categories. and added activity