fixing sentinel error