code analysis errors corrected