fixed error after refatoring