Add compatibility to old api