Bug fix #75 SQL error on message link to demographic page