fixed closure problem