Putting back in variable checks