Added some conditional stuff.