Function reference bug resolved