Compile Fix (and edit of last 2 sqls to add the missing permissions)