Might fix crash on some systems relating to MySQL error.
Use queue instead of putbytes.