Fix bug, remove optionalSubsample which is obsolete.