fixed some security problems