fixed #826 add check for dirty state container