Fixes #1

Should fix the issue. Also fixed a small problem with hiddenprivs.