fix earlier error with copied code