Fixed bugs related to empty package and amty instruction array