fixing broken db connection and members count