Several modifications for simulation stability