This commonly happens if the macarons have not had enough time to rest or the oven temperature is too high. The best way to tell if the macarons have rested enough is to touch it with your finger, if it isn't sticky and nothing comes off onto your finger they are rested.