moved 2x invalidate layout call to be more obvious