Fixes some security issues