fixed incorrect actions before, after

Fixed wrong parameters, when called after and before