fixed duplicated error message