made a few fixes to the dynamic functional