fix empty line will cause invalid read