bugfix: current element undefined