added crash control