fix exception, mode, refactor code, user issues