Added additional variable to improve tile hiding