fix #215 further - Variable scope problem