Manuel Pellegrini says his West Ham players remaining calm after going behind to Crystal Palace in the first half helped them go on to secure a 3-2 win.