buttons are not properly rendered when going back into history