fix load_demo and add ~maximum elements for LAPI