fixed views creation queries