Moar fixes to bugs found when building minicraft.