Added more message handling for Activities