Added some conditional logic