Fix errors regarding security etc