Fixing an illegal argument exception.