delete semicolon after query
Fix finding image_id by record_id