fixed readonly detection