fix array/print error bug