added debugmode for camerapositions
minor changes on patching algorythm