Set target properties explicitly for enter/leave

Fixes #785.
Merge pull request #789 from spicyj/gh-785

Set target properties explicitly for enter/leave