Fix the timestamp problem in issue #972
Fix the badly sorted tabs problem in issue #949