GRIM/EMI: attempt to fix over read buffer. cleanup types