Added workaround for libmagic issues