fixing some performance issues with params cooking unnecessarily