Change get console method. Fix bugs