fixing a couple bugs related to undefined options