enering/leaving modes tweaks