Fixed so data is stored prior to rendering