Fixing leap motion detection