fix for where and brakets
dirty hack to fix brackets