Security fixes and missed function usage