Fixed several incorrect function calls.