Fixed action beforeRun/afterRun calls.