Fixed incorrect inner function in 	riang.