Fix for weird issues with read