Revert "removed guards"

This reverts commit 2c02f01cae17ab60410517cbdbd50536860dd8c5.