Revert "Reverting changes as they didn't fix the issue"

This reverts commit e95be76590d27a0a1c65c289d80a7af53795c289.
Revert "removed die debug"

This reverts commit a0c59b59b77d6591e9bd883692810c4f747f1cb8.