these measures were the best that could be devised and although by no means perfect , at any rate , acted as a deterrent to bad behaviour and broke up many petting parties before their logical conclusion .