More error checking!

needs moar