fix class loading so variables are set