fix bug in pull code
fix bug in pull code
correct pull implementation
Fix comments