fix name not definded error