Missing elem variable definition