changed the error given in the dispatch macro and added some handling for missing symbol and invalid characters