diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in
index d7676a7a72c713b6da4f3fbf8a1ab0e3f447a526..56cdc843409d3d4c5365cc16c51e7c106379d215 100644
--- a/doxygen/Doxyfile.in
+++ b/doxygen/Doxyfile.in
@@ -58,7 +58,7 @@ PROJECT_LOGO           =
 # entered, it will be relative to the location where doxygen was started. If
 # left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = doc
+OUTPUT_DIRECTORY       = @BUILD_DIR@/doc
 
 # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
 # directories (in 2 levels) under the output directory of each output format and
diff --git a/modules/mol/alg/pymod/scoring.py b/modules/mol/alg/pymod/scoring.py
index ced6bf225a15c1ce172a860f03ed9242ab850607..ec0d77e78f84192ebd3dc0624f9017f68b0ef561 100644
--- a/modules/mol/alg/pymod/scoring.py
+++ b/modules/mol/alg/pymod/scoring.py
@@ -172,8 +172,8 @@ class Scorer:
                                            assign_elem=True)
         Molck(self._model, conop.GetDefaultLib(), molck_settings)
         Molck(self._target, conop.GetDefaultLib(), molck_settings)
-        self._model = model.Select("peptide=True or nucleotide=True")
-        self._target = target.Select("peptide=True or nucleotide=True")
+        self._model = self._model.Select("peptide=True or nucleotide=True")
+        self._target = self._target.Select("peptide=True or nucleotide=True")
 
         # catch models which have empty chain names
         for ch in self._model.chains: