fix missing attribute error