fixed a no attribute exception