fixed keyerror in tags helper