TRQ-2712 fixed an eternal loop.
TRQ-2716 Fixed a core dump.
fixing merge errors.
Merge branch 'master' into develop