corrected code issues