Fix cauptureTreeGeneration

This was edited through the github web interface. SO i kept line numbers just in case