Error handling redone sortof