Fix Cannot call method 'getAllLogs' of undefined