Fix type changing error criteria