Squashed a bug and added extra security