Fixed bugs in sausageplot and aqms2totaldb