Fix duplicate error message on cmd + test fix