Fixed bug to allow switching of categories