Fix for dependencies and scheduler exits