Fix changes in database in matprem
Fix permissions