Potentially fixes ghosting issue. See additions in read_buttons function