diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0407b698c61f54230b305c192afdf810e81a75c..86d42d2e5f6f4fdd83c55d44193fc2cda608b991 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,7 +31,7 @@ message( STATUS "CMAKE_VERBOSE_MAKEFILE: " ${CMAKE_VERBOSE_MAKEFILE} )
 message (STATUS "MODULE_PATH: " ${CMAKE_MODULE_PATH})
 set(CMAKE_COLOR_MAKEFILE ON)
 set(JPSGUI_MAJOR_VERSION 0)
-set(JPSGUI_MINOR_VERSION 1)
+set(JPSGUI_MINOR_VERSION 7)
 set(JPSGUI_PATCH_VERSION 0)
 set(JPSGUI_VERSION
   ${JPSGUI_MAJOR_VERSION}.${JPSGUI_MINOR_VERSION}.${JPSGUI_PATCH_VERSION})
@@ -109,6 +109,10 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
 # Instruct CMake to run moc automatically when needed.
 set(CMAKE_AUTOMOC ON)
 
+IF (WIN32)
+    SET (QT_USE_QTMAIN TRUE)
+ENDIF (WIN32)
+
 #--------------- here comes QT. Version problem (4 or 5?)
 
 FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake  REQUIRED)
@@ -217,7 +221,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --c++11 -Minform=inform")	
 endif()
 
-
+message(STATUS "INSTALL_PREFIX: " ${CMAKE_INSTALL_PREFIX})
 #--------------------------------------------------------------------------------
 # Now the installation stuff below
 #--------------------------------------------------------------------------------
diff --git a/src/GraphicView.cpp b/src/GraphicView.cpp
index 8ece982c2de0f4d9906bbc4ab378a0a1895cc125..b98f0cc62db862c88bdc57982e233b61626a0a4c 100644
--- a/src/GraphicView.cpp
+++ b/src/GraphicView.cpp
@@ -147,12 +147,12 @@ void jpsGraphicsView::mouseMoveEvent(QMouseEvent *mouseEvent)
     }
 
 
-    if (midbutton_hold==true)
+    if (midbutton_hold)
     {
         translations(old_pos);
     }
 
-    else if(leftbutton_hold==true)
+    else if(leftbutton_hold && currentSelectRect)
     {
         currentSelectRect->setRect(QRectF(QPointF(currentSelectRect->rect().x(),currentSelectRect->rect().y())
                                          ,QPointF(translated_pos.x(),translated_pos.y())));
@@ -161,7 +161,7 @@ void jpsGraphicsView::mouseMoveEvent(QMouseEvent *mouseEvent)
     translated_pos.setX(pos.x()-translation_x);
     translated_pos.setY(pos.y()-translation_y);
 
-    if (objectsnap==true)
+    if (objectsnap)
     {
         catch_points();
 
diff --git a/src/jpswaypoint.cpp b/src/jpswaypoint.cpp
index 454e6c51f7bbdc46989e393648f12d6cbde1fc0e..f9778cd1265fae2135db037d5739e19697cc8cf1 100644
--- a/src/jpswaypoint.cpp
+++ b/src/jpswaypoint.cpp
@@ -27,7 +27,7 @@
  **/
 
 #include "jpswaypoint.h"
-
+#include <cmath>
 jpsWaypoint::jpsWaypoint()
 {