Added functionality of preserving the current category on refresh