little additions to avoid bugs