fix bug regarding function forwarding