Fix Exception and replace it by InvalidArgumentException