fixed incorrect actions before, after
check type for actions after, before
Merge pull request #3 from lkalinka/master

fixed incorrect actions before, after