Add check for bad characters, closes #9