Category model bug

Done for https://issues.jboss.org/browse/AGPUSH-1118

Needs to go to 1.0.x and master