fixed another two bugs:
1) default contact bit mask should be 0x80, not 0x50
2) need to use Integer.decode() instead of .parseInt()