Fixes read function proto