fixed a few bugs on options