Fix slow rendering of weblog page (pass from 1021 querys to 74), fix a bug in portfolios' updating and deleting view