Fix undefined sub reference