Fix for issue #1426. Default value of threads is passed in case user
passes in 0.