diff --git a/CMakeLists.txt b/CMakeLists.txt
index aad8c2764eb9198d5cb365231f0d9d575fa80c7f..1d95715e63c13b01bda24084cb7b6fd742f60b3c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -179,13 +179,13 @@ if($QT_QMAKE_EXECUTABLE STREQUAL "")
 endif()
 # default qt version is 4
 if("${DESIRED_QT_VERSION}" STREQUAL "")
-  set(DESIRED_QT_VERSION "4")
+  set(DESIRED_QT_VERSION "5")
 endif()
 
 # qt version > 5 or qt version < 3 are not supported
 if( ${DESIRED_QT_VERSION} VERSION_GREATER 5 OR ${DESIRED_QT_VERSION} VERSION_LESS 3)
-  message(WARNING "Desired QT version " ${DESIRED_QT_VERSION} " not supported. Taking 4")
-  set(DESIRED_QT_VERSION "4")
+  message(WARNING "Desired QT version " ${DESIRED_QT_VERSION} " not supported. Taking 5")
+  set(DESIRED_QT_VERSION "5")
 endif()
 
 # find packages according to qt version
@@ -209,15 +209,6 @@ elseif("${DESIRED_QT_VERSION}" STREQUAL "4")
    set(QT_USE_QTNETWORK TRUE)
 endif()
 
-if(QT5_INSTALLED)
-  message(STATUS "QT5_INSTALLED: " ${QT5_INSTALLED})
-elseif(QT4_INSTALLED )
-    MESSAGE(STATUS "Check Qt 4 .................................... yes")
-elseif(QT3_INSTALLED)
-    MESSAGE(STATUS "Check Qt 3 .................................... yes")
-else()
-    MESSAGE(STATUS "Check Qt 4          ...  no")
-endif()
 # Disable automatic conversion from QString to ASCII 8-bit strings (char *)
 # (Keeps code compatible with Qt/Mac/64bit)
 if(APPLE)
@@ -243,6 +234,7 @@ if(${QT4_INSTALLED})
   )
   TARGET_LINK_LIBRARIES( jpsvis ${QT_LIBRARIES})
 elseif( ${QT5_INSTALLED})
+  message(MESSAGE "libs: ${Qt5Widgets_LIBRARIES}  ${QT_LIBRARIES}")
   # http://www.kdab.com/using-cmake-with-qt-5/
   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}" )
   qt5_wrap_ui( UI_HDRS ${UIS} )
@@ -276,15 +268,22 @@ ENDIF(APPLE)
 set(VTK_USE_GUISUPPORT  ON) 
 set(VTK_USE_QT  ON)
 # QVTK is for VTK 5.x. For VTK 6, use ${VTK_LIBRARIES} instead
+
+if( ${QT_INSTALLED})
+  SET(QTLIBS ${QT_LIBRARIES})
+elseif( ${QT5_INSTALLED})
+  SET(QTLIBS ${Qt5Widgets_LIBRARIES})
+endif()
+
 if(VTK_LIBRARIES)
   if(${VTK_VERSION} VERSION_LESS "6")
-    TARGET_LINK_LIBRARIES( jpsvis ${QT_LIBRARIES} QVTK)
-    
+   TARGET_LINK_LIBRARIES( jpsvis ${QTLIBS} QVTK) #qt5
   else()        
-    TARGET_LINK_LIBRARIES( jpsvis  ${VTK_LIBRARIES} ${QT_LIBRARIES})
+    #    TARGET_LINK_LIBRARIES( jpsvis  ${VTK_LIBRARIES} ${QT_LIBRARIES})
+    TARGET_LINK_LIBRARIES( jpsvis  ${VTK_LIBRARIES} ${QTLIBS}) #qt5   
   endif()
 else() # this else is not yet tested
-  target_link_libraries(jpsvis vtkHybrid QVTK vtkViews ${QT_LIBRARIES})
+  target_link_libraries(jpsvis vtkHybrid QVTK vtkViews ${QTLIBS})
 endif() 
 # ================================ Compiler flags
 # enable as many warnings as possible
@@ -374,8 +373,13 @@ INSTALL(CODE "
 # for dependencies.  If they are not system dependencies, they are copied.
 
 # directories to look for dependencies
-SET(DIRS ${QT_LIBRARY_DIRS})
-
+#SET(DIRS ${QT_LIBRARY_DIRS} ${QTPLUGINS})
+if( ${QT4_INSTALLED})
+  SET(DIRS ${QT_LIBRARIES})
+elseif( ${QT5_INSTALLED})
+  SET(DIRS ${QT_LIBRARY_DIRS})
+endif()
+message(STATUS "qt_lib_dirs  ${QT_LIBRARY_DIRS}")
 # Now the work of copying dependencies into the bundle/package
 # The quotes are escaped and variables to use at install time have their $ escaped
 # An alternative is the do a configure_file() on a script and use install(SCRIPT  ...).
@@ -449,18 +453,18 @@ else()
 endif()
 
 # https://github.com/artm/vision-ui-skeleton/blob/master/cmake/QArtmRelease.cmake
-IF(APPLE)
-  SET(EXE_CONTENTS "${CMAKE_INSTALL_PREFIX}/${EXECUTABLE}/Contents")
-  FILE(WRITE
-    ${EXE_CONTENTS}/Resources/qt.conf
-    "[Paths]\nPlugins=PlugIns\n")
-  FILE(COPY ${QT_PLUGINS_DIR}/imageformats
-    DESTINATION ${EXE_CONTENTS}/PlugIns/
-    PATTERN "*_debug.*" EXCLUDE)
-  ADD_CUSTOM_COMMAND(
-    TARGET ${PROJECT_NAME} POST_BUILD
-    COMMAND ruby ${PROJECT_SOURCE_DIR}/ruby/fixup/fixup.rb ${CMAKE_INSTALL_PREFIX}/${EXECUTABLE}
-    COMMENT "Fixing up the app bundle")
-ENDIF(APPLE)
+ # IF(APPLE)
+#   SET(EXE_CONTENTS "${CMAKE_INSTALL_PREFIX}/${EXECUTABLE}/Contents")
+#   FILE(WRITE
+#     ${EXE_CONTENTS}/Resources/qt.conf
+#     "[Paths]\nPlugins=PlugIns\n")
+#   FILE(COPY ${QT_PLUGINS_DIR}/imageformats
+#     DESTINATION ${EXE_CONTENTS}/PlugIns/
+#     PATTERN "*_debug.*" EXCLUDE)
+#   ADD_CUSTOM_COMMAND(
+#     TARGET ${PROJECT_NAME} POST_BUILD
+#     COMMAND ruby ${PROJECT_SOURCE_DIR}/ruby/fixup/fixup.rb ${CMAKE_INSTALL_PREFIX}/${EXECUTABLE}
+#     COMMENT "Fixing up the app bundle")
+# ENDIF(APPLE)
 
 
diff --git a/forms/Settings.cpp b/forms/Settings.cpp
index d945e7c1dfda62d1b6c02dfb42fed6a08d935124..c8899d5917371776f34c1982682b6fbc946244f2 100644
--- a/forms/Settings.cpp
+++ b/forms/Settings.cpp
@@ -104,7 +104,11 @@ void Settings::slotPickPedestrianColor()
     QColor col=colorDialog->getColor("choose the new pedestrian color");
 
     // the user may have cancelled the process
-    if(col.isValid()==false) return;
+    if(col.isValid()==false) {
+        delete colorDialog;
+        return;
+    }
+    
     slotChangePedestrianColor(col);
 
     delete colorDialog;
@@ -210,7 +214,10 @@ void Settings::slotPickCaptionColor()
     tmpCaptionColor=colorDialog->getColor();
 
     // the user may have cancelled the process
-    if(tmpCaptionColor.isValid()==false) return;
+    if(tmpCaptionColor.isValid()==false) {
+        delete colorDialog;
+     return;
+    }
 
     int size =ui.CbCaptionSize->currentText().toInt();
     int orientation= ui.ComboCaptionOrientation->currentText().toInt();
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 8b9655567da60246a97c5c07cfb18bc300553c26..1fb2ebf98b78467f99fc46df0bdf853b5ff491fc 100755
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -722,7 +722,7 @@ bool MainWindow::addPedestrianGroup(int groupID,QString fileName)
     }
 
     //no other geometry format was detected
-    double frameRate=15; //default frame rate
+    double frameRate=16; //default frame rate
     statusBar()->showMessage(tr("parsing the file"));
 
 
diff --git a/src/SaxParser.cpp b/src/SaxParser.cpp
index 73696cfb67716b225aaa25f490343ca61d2304c3..c54b7a771e699205d30b0674a63e975d8830d893 100644
--- a/src/SaxParser.cpp
+++ b/src/SaxParser.cpp
@@ -463,9 +463,9 @@ bool SaxParser::startElement(const QString & /* namespaceURI */,
         }
 
         //coordinates of the ellipse, default to the head of the agent
-        if(std::isnan(el_x)) el_x=xPos;
-        if(std::isnan(el_y)) el_y=yPos;
-        if(std::isnan(el_z)) el_z=zPos;
+        //if(std::isnan(el_x)) el_x=xPos;
+        //if(std::isnan(el_y)) el_y=yPos;
+        //if(std::isnan(el_z)) el_z=zPos;
 
         //double pos[3]={xPos,yPos,zPos};
         //double vel[3]={xVel,yPos,zPos};
diff --git a/src/SimpleVisualisationWindow.cpp b/src/SimpleVisualisationWindow.cpp
index 09f39af89268f1849e18b2b40d03caf4b3f701f9..cbe4e30015fd8f9e10287f58feb5c8024b59e666 100644
--- a/src/SimpleVisualisationWindow.cpp
+++ b/src/SimpleVisualisationWindow.cpp
@@ -123,7 +123,7 @@ void SimpleVisualisationWindow::start()
 
     // Create an interactor
     vtkRenderWindowInteractor *renderWinInteractor = vtkRenderWindowInteractor::New();
-    renderWinInteractor = vtkRenderWindowInteractor::New();
+    // renderWinInteractor = vtkRenderWindowInteractor::New();
     renderWindow->SetInteractor( renderWinInteractor );
     //set full screen and catch esc to restore defaults one
     //renderWindow->SetFullScreen(1);