fix class loading order