bit of security and fixes