[fix] updated to mantis #4312 and mantis #5296

Change-Id: Ia656f900a3e31475c921b36b0da65de31744c350