Security draft

+bug fixes