fixing issues with scanning and decoding when creating dispatches