Fixed some security holes