Fixing code error