time update and bug fixing