Some safety fixes...