some bugs with offset listener fixed