stat format and bugfix