fix fitBounds on content closing and layer object change