Fixed a couple of fringe cases where behaviors did not work. Optimized shuffle check.