Fix issue with field, add test cases for permissions