Edited leveling variables to reduce bounce