Small fix when changing to db layer.