Fixed array-deletion before output