Fixed erase data bug