Fixed problem with SQL Error on Research completion (caused by code refactorization)