Drain the pineapple well before making the topping. You can always add a little pineapple juice to the topping when you make it. if there's to much juice, it'll be a thin topping that won't stay on the cake well.
Make sure that the cake is completely cooled before you frost it.