Fixed some security problems