Fix NullPointer see
http://stackoverflow.com/questions/23873542/error-in-streaming-dynamic-resource-null