Fix broken extension construction