Fixed explosion resistance.

Also backported buildscripts.