Replaced some missing code.