fixed delete NPE