fixed some bugs with reading properties