Fix Code errors