Fixes activity generation.