Fixed last string non-empty bug