fixed exception loop