You should let your cake cool on a cooling rack for at least 10 minutes before adding icing to the top of the cake. The icing will set up much better on a cooled cake.