Fix some bugs for /search and mouse log function

Working on and log to models