Fixed rearrangeButtons :D