fixed incorrect code