Fix pull/push logic