made sure to pass back objects after performing a function on them.

Signed-off-by: Lim Kiang Teng <kiangtengl@gmail.com>