bugfix of execution of SQL query in a constuct.