maskBits and ContactList

hi guys.
i found some strange behavior with contactList in my project.
i was using the BoxMan class and setting maskBits and categoryBits, but when i do that, manifold returns null.

The thing is:
i have one player, enemies and ground. Then i want the player to collide with enemies and ground, the enemies with player and ground but not with each other.
The player uses the BoxMan class from demo. i was setting maskBits and categoryBits, like this:

player
maskBits = 6;
categoryBits = 8;

enemies
maskBits = 10;
categoryBits = 4;

ground
maskBits = 12;
categoryBits = 2;


Code:
if(!contacts.isEmpty()) {
            contacts.forEach(function(keys:Array, c:ContactEvent) {
               var wm:b2WorldManifold = c.getWorldManifold();
               if(wm.normal) {

                  var d:Number = wm.normal.dot(gravity);
                  if(!manifold || d > dot) {
                     manifold = wm;
                     dot = d;
                  }
               }
            });

This doesnt works. It seems contact it's always empty. So manifold its always null and BoxMan cant jump.

what im doing wrong?
sorry for my bad english.
What happens if you use the default category / masks for the ground & player and just tweak the enemy category / mask bits? Since all you're doing is trying to get enemies to not collide I think you only need to set those properties for them. I suspect this problem is unrelated to category / mask bits though.
I just came across a similar issue with collisions not working. My issue was that I set categoryBits to 3. However, you have to use multiples of 2:
Somebody's example:

enum CollideBits { cbNone = 0, cbWall = 1, cbPlayer = 2, cbEnemy = 4, cbBullet = 8 16,32,64... };

Original thread: https://box2d.org/forum/viewtopic.php?t=7130