Fixed float conversion logic, writing to val_long was missing in both decleration and the bitwise orring logic