magic: some minor fixes.