Fixed category ajax issues, closes #347