Fix truncation issue with random events (double -> int)