Fix for bug 1005007 and bug 1006526
Merge pull request #3613 from abhgupta/abhgupta-scheduler

Merged by openshift-bot