fixing issue in which the url was inaccurate immediately after activating layer

(url state was showing layer as invisible immediately after activating,
when it should show layer state as visible)