US stocks open higher to recover from previous losses