fixed problem with no doc in tab after creating or saving it