Fix notices when using classes