fix for sql query to get candidate notes