Fixed incorrect function calls