Linux build fix and removal of unused variable