hacker's fix of the memory problem when creating photon tracks. This is not properly tested, yet.