Fixed bug if MTP header is incorrectly parsed
Merge branch 'master' into dev_python
Fixed some build files,...

Fixed some deadlocks, fixed MC_ResumeAgency
Some small changes