Fix unpack_map segfault, and use double type for all number unpacking