ASDK-143

I don't think this is unit testable but I thoroughly tested it with a sample application.