Resolved by using binary_to_existing_atom.