unused vars / fix SIGFPE

fixes some compiler warnings / a SIGFPE