added code to check for double-bind