Fixed crash on Windows and Linux and fixed Time namespaces