Added rudimentary crash-fix