Fixed NULL library instance issue which will cause unsupported module type error.