Fixed log end issue