fixed debug crash