Fixed #11 and Call to a member function get_uri() on a non-object error