Fixed template modification time checking.