Fixed mark/reset exception, formatting