Fixed bad deadlock in time_map.c / Merged into version-1.0