major bug fixes, fixed deathtest function