Revert "fix for notice found while QA of CRM-12348, and added a missing executeQuery statement"

This reverts commit 9cd14c2f92f11b5edaa960ed14abbb8134a5ec1e.