fixes random crashes from the logs