Fixed writeOnlyProperty NullPointer issue.