removed unused variable reference bug