fixed views to be able to run raw sql