fix local_props bug
fix bugs and complexity issue