Judge reinstates medical marijuana license