fix bag NPE