fix some security problems