Joomla2.5: K2 problem with Itemid in URL – itemlist view

I found a way to solve both problems, but I don’t know if this is the right way to solve it.

I added an IF sentence in the second pass of the function “_findItem” to find the right item when there is the value ‘item’ in $needles, like this:
Add this code

if ($needle=='item') {
	if(isset($item->jparams)) {
		$match = $item;	

After that code

if(is_null($match)) {
	foreach ($items as $item) {