small fixes; diff logging at dev
onleave handler added/removed