Fix some security aspects