Minor fixes

- Fixed a few minor things
- Moved FlagCheck(byte,byte) to HHelper and made it use int32 as input
instead