Bug fixes, changed match to first to five