fixed potential array calling issues