added a few more defences