Added some basic validation.