Fixed error that function does not exist