Category related fixes for 1.3.6

No need to merge yet.