Added assertion for db