Fixing null function pointer