fix bug with precedence of non absolute class type and regex type
fix wrong exception message