Fixed issue with pads_clear that was causing array out bounds.