variable preparation bug solved