fixing code error