Maciek's changes for setting valuesin options