Trying to prevent crash on reset