Set target properties explicitly for enter/leave

Fixes #785.