fixed fail msg and empty bug