Hm, there are some typos on this line. Not only is 'a' checked twice, but you set all the bits to 0x1 - I would have expected you to use 0x1, 0x2, 0x4, 0x8 for example.