Fix the push_patch function to not always call refresh_patch