Fix broken extension load code