fix class block scope