bug in restrict phase