Fix settings variable and change margin to padding to increase the elements event area