Error handling n stuff.