Bit shifting happens differently for signed ints. Fixed now
Oops, finished casting now