fix bug in status calc