fix for null lastException