bugfix pick.html & view + new sql