fix no attribute exception