Fix judge array empty bug