Fix for bug 1007582 and bug 1008517
Merge pull request #3633 from abhgupta/abhgupta-scheduler

Merged by openshift-bot