Added validation of activies.