Point detection fix

Updated the source code to fix issue #4 involving point detection freezing.