Fixed problem with inner query parameters