"Fix potential error in Scheduler.java:100-108"

Bugfix