LPS-37465 Multiple problems when adding mobile device rules to a page

Hi Jorge,
these 2 small commits (one line each) fix the last problems in LPS-37465 (and also: LPS-36530, LPS-37988)