handle binary data more gracefully