fix a bug in liberal safety implementation