Fixed warnings with Cygwin. Fixed crashes on very high frame numbers