made countdown working in all situations