minor bug fixes

Change-Id: If7a34f7c5ea7aa641b78d0fe8d8a082c4555e08f