Feature/bug fix local variables