Fix history template layout