Fixed #901, but does not include as many options as before due to current limitation.