Fix dist building script

DO NOT MERGE NOW