Better signature invalid char handling