improve appearance and remove leaking scope