Added some better error handling