fixed coredump bug under unix