Made timer work correctly between screens