fix some strange behaviour

Change-Id: I93af29bcf60210266037d36568be43f27477d530