Little changes to theme parsing

Change-Id: Ie5e7b86799fda82611edf299952a8508efd7dc5f