handled refresh bug with data not clearing