Fixed error when restart app