fix some bugs with push and pull