fix bug from copyed code