fixed regex for error mapping