Fixed invalid argument exception.