fixed option error handling