fixes: toggling visibility of layer requires two clicks