Fixed a bug in the explode_mode code that was causing a crash