fix --dist option for cortex build