security fixes
improve last galaxy query for dashboard view performance