fixes an error where the array wasn't printing new info when the page was refreshed.