Fixes in security model