fixed cofp bug