Fixed bug causing illegal argument exception.