diff --git a/README.md b/README.md
index 7d1ac7d8f8ec073d83c2399d1c3d149f675cb156..ccb681b36dcd9f4cf0db6e9f268133c9123555fc 100644
--- a/README.md
+++ b/README.md
@@ -50,3 +50,5 @@ When running a jupyter notebook and importing binary_c, it might happen that the
 Also: I figured that having binaryc output the log like "<LOG HEADER> t=10e4 ..." (i.e. printing the parameter names as well as their values) would be useful because in that way one can easily have python read that out automatically instead of having to manually copy the list of parameter names.
 
 See examples/ dir for some working examples
+
+When you try to `import binary_c_python_api` and python complains about it not existing, but you are sure that you correctly included the necessary pythonpaths, then you probably need to rebuild the package:
\ No newline at end of file
diff --git a/binarycpython/utils/custom_logging_functions.py b/binarycpython/utils/custom_logging_functions.py
index a583292fdb0649b63e5c8c06bdcd2561ccf20aba..12af7c84b73eb751501110de17f500cab21923d5 100644
--- a/binarycpython/utils/custom_logging_functions.py
+++ b/binarycpython/utils/custom_logging_functions.py
@@ -240,6 +240,8 @@ def return_compilation_dict(verbose=0):
 def compile_shared_lib(code, sourcefile_name, outfile_name, verbose=0):
     """
     Function to write the custom logging code to a file and then compile it.
+    
+    TODO: nicely put in the -fPIC
     """
 
     # Write code to file
@@ -257,7 +259,7 @@ def compile_shared_lib(code, sourcefile_name, outfile_name, verbose=0):
     compilation_dict = return_compilation_dict(verbose)
 
     # Construct full command
-    command = "{cc} {ccflags} {libs} -o {outfile_name} {sourcefile_name} {inc}".format(
+    command = "{cc} -fPIC {ccflags} {libs} -o {outfile_name} {sourcefile_name} {inc}".format(
         cc=compilation_dict["cc"],
         ccflags=compilation_dict["ccflags"],
         libs=compilation_dict["libs"],
diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py
index ee822191cbb6d321c301bec2b4a3503823464310..2207af134ec18a270bff213b00fd89abe2314aea 100644
--- a/binarycpython/utils/grid.py
+++ b/binarycpython/utils/grid.py
@@ -1108,13 +1108,14 @@ class Population(object):
             #########################
             # Setting up pre-code and value in some cases
             # Add pre-code
-            code_string += (
-                indent * (depth + 1)
-                + "{}".format(
-                    grid_variable["precode"].replace("\n", "\n" + indent * (depth + 1))
+            if grid_variable["precode"]:
+                code_string += (
+                    indent * (depth + 1)
+                    + "{}".format(
+                        grid_variable["precode"].replace("\n", "\n" + indent * (depth + 1))
+                    )
+                    + "\n"
                 )
-                + "\n"
-            )
 
             # Set phasevol
             code_string += indent * (depth + 1) + "phasevol *= phasevol_{}\n".format(