Fix closure problem when importing multiple files