Fixed bugs in signal removal from db.