fix bug logging