fix hanging issues