adjust Makefile.am and fix the time problem for offline