Fix time dependent code