Fixing warnings caused by unused variables