Merge "Fix a bug in motion search code(2)"