extract options from query string

fixes #1293