fixing panic call