fixed bug with parameters only being evaluated once