Bug fixes to pattern portfolio