Solved empty elements problem