Possibly corrected the code