Revert "hack to prevent runtime error"

This reverts commit 1eda4c7b0305d7b74dcd08053d781ae1edaea5d9.
Revert "Revert "hack to prevent runtime error""

This reverts commit 657c023cbf6f70ecc1c884606f6c18dd705f38c6.