A partial fix for runtime exceptions