fixing code issues