Fix undefined functions being allowed to be called