Trying to fix IllegalArgumentException.