Fixed some bugs in logs parsing