sqlite sum bug