Added test for null scheduler. Fixes #186