hopefully fixed bug where query errors don't close modal