Workaround for the problem with hanging whili compiling C-extensions
fixes for making work some general functions