Fixed random crashes