Added return in front of res.json in case of \!(1 <= ligands && ligands <= 1000000)