upgrade to 4.0.1 and improvements to scheduler