Only print debugmsg when falling if testing mode is on.
Fix memory leak caused by generating submaps with z > 0.
Fix conflict.