more fixes!

Runtime fixes
Fixes #4756
Fixes #4697