Revert "revert ondemand 'fix'"

This reverts commit 2680d11cc7c731655c51f9d9df9978cab7addc4b.