Shouldn't your example use this code?