Added base64 check to fix #34