Revert "fix bug in removing remote attributes if push is not enabled"

This reverts commit c4d5344153a7f183372f3acbc703e6bfcb57e23e.