Changed from setting javaMemoryLimit to memoryLimit because it it propagates values from memoryLimit to javaMemoryLimit and not the other direction.