slight performance improvements

Change-Id: I6c4a8a50efe065cd3d8e570c5237049dac63e412