Added read code only flag, and fixed a typo