derp, fix bit shifting/masking