fixed nil.empty bug?