Fix app crash in timer mode && improve timer