Thanks for the Pull request! I couldnt quite merge as is (was lacking tests), but I fixed it at http://dev.piwik.org/trac/ticket/4235#ticket Cheers!