fixed bugs depended on time.now