Bug fix, added wrapper variable